<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div class="con">
        <div class="cube">
            <div class="side front"><img src="/微信图片_20220210191406.jpg" width="200" height="200" alt=""></div>
            <div class="side left"></div>
            <div class="side right"></div>
            <div class="side back"></div>
            <div class="side top"></div>
            <div class="side bottom"></div>
        </div>
    </div>
    <style>
        body{
            background-color: rgb(255, 255, 255);
        }
        .con{
            position: relative;
            perspective: 800px;
            perspective-origin: top right;
            width: 400px;
            height: 400px;
            margin: 400px;
            border: 2px solid rgb(132, 34, 34);
            border-radius: 4px;
        }
        .cube{
            position: absolute;
            width: 200px;
            height: 200px;
            transform-style: preserve-3d;
            margin: auto;
            left: 50%;
            top: 50%;
            transform: translate(-50%,-50%);
            animation:move 10s ease-in-out infinite ;
        }
        .side{
            position: absolute;
            width: 100%;
            height: 100%;
            opacity: 0.6;
            border: 2px solid white;
        }
        .front{
            transform: translateZ(100px);
           
        }
        .back{
            transform: rotateY(180deg) translateZ(-100px);
        }
        .left{
            
            transform: translateX(-100px) rotateY(90deg);
        }
        .right{
            background-color: yellow;
            transform: translateX(100px) rotateY(90deg);
        }
        .top{
            background-color: violet;
            transform: translateY(-100px) rotateX(90deg);
        }
        .bottom{
            background-color: green;
            transform: translateY(100px) rotateX(-90deg);
        }
        @keyframes move{
            from{
                transform: translate(-50%,-50%) rotate(0deg) rotateX(720deg) rotateZ(0deg);

            }
            to{
                transform: translate(-50%,-50%) rotateY(360deg) rotateX(0deg) rotateZ(360deg);
            }
        }
    </style>
</body>
</html>